﻿@model kmaraszkiewicz.Models.Job

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm("Create", "Job", new { parent = ViewBag.AuthorDescriptionId }))
{   
    <fieldset>
        <legend>Job</legend>
        <div class="editor-field">
            @Html.HiddenFor(model => model.AuthorDescriptionId, new {  @Value = ViewBag.AuthorDescriptionId.ToString() })
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CompanyName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CompanyName)
            @Html.ValidationMessageFor(model => model.CompanyName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ComapnyLinkUrl)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ComapnyLinkUrl)
            @Html.ValidationMessageFor(model => model.ComapnyLinkUrl)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.JobPosition)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.JobPosition)
            @Html.ValidationMessageFor(model => model.JobPosition)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateFrom)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateFrom)
            @Html.ValidationMessageFor(model => model.DateFrom)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateTo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateTo)
            @Html.ValidationMessageFor(model => model.DateTo)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Edit", "AuthorDescription", new { id = ViewBag.AuthorDescriptionId }, null)
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/jqueryval")
    <script type="text/javascript" >
        $(document).ready(function () {
            $("#DateFrom").datepicker()
            $("#DateTo").datepicker()
        })
    </script>
}
